Method for debugging reconfigurable architectures

ABSTRACT

A method for debugging reconfigurable hardware is described. According to this method, all necessary debug information is written in each configuration cycle into a memory, which is then analyzed by the debugger.

CROSS REFERENCE TO RELATED APPLICATIONS

This application is a continuation of and claims priority to U.S. patent application Ser. No. 10/487,687, filed on Aug. 25, 2004, now U.S. Pat. No. 7,480,825 and claims benefit of and priority to International Application Serial No. PCT/DE02/03278, filed on Sep. 3, 2002, which claims benefit of and priority to German Patent Application Serial No. 101 42 904.5, filed on Sep. 3, 2001, the entire contents of each of which are expressly incorporated herein by reference.

FIELD OF THE INVENTION

The present invention relates to methods for debugging programs on reconfigurable architectures.

BACKGROUND INFORMATION

Reconfigurable architecture refers to modules (VPUs) having a configurable function and/or interconnection, in particular integrated modules having a plurality of one-dimensionally or multidimensionally arranged arithmetic and/or logic and/or analog and/or memory and/or interconnecting modules (hereinafter referred to as PAEs) and/or communicative/peripheral modules (IOs) that are interconnected directly or via one or more bus systems. PAEs are arranged in any configuration, combination, and hierarchy. This system is referred to below as a PAE array or PA.

The generic class of such modules includes in particular systolic arrays, neural networks, multiprocessor systems, processors having a plurality of arithmetic units and/or logic cells, interconnection and network modules such as crossbar switches, as well as conventional modules of the generic types FPGA, DPGA, XPUTER, etc. In this connection, reference is made in particular to the following applications of the same applicant: P 44 16 881.0-53, DE 197 81 412.3, DE 197 81 483.2, DE 196 54 846.2-53, DE 196 54 593.5-53, DE 197 04 044.6-53, DE 198 80 129.7, DE 198 61 088.2-53, DE 199 80 312.9, PCT/DE 00/01869, DE 100 36 627.9-33, DE 100 28 397.7, DE 101 10 530.4, DE 101 11 014.6, PCT/EP 00/10516, EP 01 102 674.7, DE 102 06 856.9, 60/317,876, DE 102 02 044.2, DE 101 29 237.6-53, DE 101 39 170.6. These are herewith incorporated to the full extent for disclosure purposes.

In addition, it should be pointed out that the methods to be described here may be used for groups of multiple modules. Nevertheless, reference is made below to a VPU and/or to “modules.” These modules and their operations are to be further improved.

SUMMARY

An object of the present invention is to provide something novel for commercial use.

A plurality of variants and hardware implementations (which make efficient debugging of VPU systems possible) are presented in the following.

1. Example Embodiments

In a preferred variant, debugging is performed either by using a microcontroller appropriately connected to a VPU or the module or by the load logic according to the patents P 44 16 881.0-53, DE 196 51 075.9, DE 196 54 846.2-53, DE 196 54 593.5-53, DE 197 57 200.6-33, DE 198 07 872.2, DE 101 39 170.6, DE 199 26 538.0, DE 100 28 397.7, the full content of which is herewith incorporated by this reference. As will be seen, however, other hardware variants may also be used.

The following basic methods may be used alternatively and/or jointly here:

1.1 Detecting a Debug Condition

1.1.1 Condition

The programmer defines, e.g., within the debugging tool, one or more conditions which start debugging (cf. breakpoint according to the related art). The occurrence of the conditions is detected at run time in the VPU and/or in any device exchanging data with the VPU. This preferably takes place due to the occurrence of certain data values with certain variables and/or certain trigger values with certain PAEs.

1.1.2 Precondition

In the optimum case, a certain condition according to the definition given above may already be defined by the programmer several cycles before the occurrence of the debugging condition. This precludes, from the beginning, certain latency problems which are discussed below.

Two fundamental types of debugging for VPUs are discussed below, the method preferred in each case depending on the choice of the compiler. Method A described below may be particularly suitable for compilers which generate code on the basis of instantiated modules of a hardware description language (or a similar language).

For compilers like those described in DE 101 39 170.6 and additional applications which generate complex instructions according to a method like VLIW, method B described below is particularly suitable. Generally, method B is the method preferred for operation of a VPU or a corresponding module as a processor or coprocessor.

It has been recognized that in particular the use of the two methods A and B together yields the best and most transparent debugging results. In particular, depending on the depth of the error to be debugged, it is possible to perform debugging first with the help of fast debugging method B, and then after adequate localization of the error, to analyze the details in depth by method A.

2. Method A

2.1 Basic Principle

After the occurrence of a (pre)condition, the VPU is stopped. The relevant debug information is then transferred from the PAEs to the debug program. The relevant debug information has previously been defined by the programmer within the debug program. After readout of all relevant debug information, the next cycle is executed and the relevant debug information is again read out. This is repeated until the programmer terminates the debugging operation. Instead of stopping the VPU, other methods are optionally also possible. For a given sequence of cycles, for example, data may be made available repeatedly for readout, if this is possible rapidly enough.

2.2 Support by the Hardware

2.2.1 Readout from the Registers

Essential for the functioning of the debugger is the possibility of reading back another externally connected (host) processor or a reserved area of array, the internal data registers, and/or status registers, and/or state registers, and optionally, depending on implementation, other relevant registers and/or signals from the PAEs and/or the network through a higher level unit (referred to below as a debug processor (DB)), i.e., a CT or a load logic, for example, and doing so only for selected registers and/or signals (referred to jointly below as debug information). Such a possibility is implementable, for example, with the connection created in PCT/DE 98/00334 between the load logic and the data bus of a PAE (PCT/DE 98/00334 0403, FIG. 4).

It should be pointed out explicitly that serial methods for readout of the registers may also be used. For example, JTAG may be selected, and the DB may also be connected via this method and optionally also as a separate external device, possibly a device that is commonly available on the market (e.g., from Hitex, Karlsruhe).

Since the debugger may have reading and/or writing access to all registers or at least a considerable number of them, it is optionally and preferably possible to omit a significant portion of the (serial) chaining of the registers for test purposes (scan chain) for the production tests of the chip. The scan chain is normally used to permit preloading of test data into all the registers within a chip during production tests and/or to permit the contents of the registers to be read back for test purposes. Preloading and/or reading back then typically take place through test systems (e.g., SZ Test Systems, Amerang) and/or according to the methods described in DE 197 57 200.6-33. The scan chain requires an additional not insignificant hardware complexity and surface area required for each register. This may now be eliminated at least for the registers that are debuggable, if, as proposed according to the present invention, production testing systems have access to the registers via suitable interfaces (e.g., parallel, serial, JTAG, etc.)

2.2.2 Stopping or Slowing down the Clock Cycle

The clock may either be stopped or slowed down due to the occurrence of the condition and/or precondition to make available enough time for readout. This debug start is triggered in particular either directly by a PAE that has calculated the (pre)condition(s) or by a higher-level unit (e.g., load logic/CT, host processor) on the basis of any actions, e.g., due to the information that a pre(condition) has occurred on a PAE and/or due to an action within the debug processor and/or through any program and/or any external/peripheral source. Trigger mechanisms according to P 44 16 881.0-53, DE 196 51 075.9-53, DE 197 04 728.9, DE 198 07 872.2, DE 198 09 640.2, DE 100 28 397.7 are available for information. Alternatively, the clock pulse may be slowed down in general in debugging. If only array parts are to be debugged, a partial slowing down of the clock pulse may also be provided.

If the clock pulse is slowed down, all the relevant debug information must be read out of the PAEs by the debug processor within the slowed-down cycle of the processing clock pulse. It is therefore appropriate and preferable to slow down the clock pulse only partially, i.e., to reduce or stop the working clock pulse but to continue the clock pulse for the readout mechanism. In addition, it is reasonable and preferable to supply the registers in general with a clock pulse for data preservation.

After stopping the clock pulse, a single-step mode may be implemented, i.e., the debug processor stops the processing clock pulse until it has read out all the debug information. It restarts the processing clock pulse for one cycle and then stops it again until all relevant debug information has been read out.

The readout clock pulse and the clock pulse of the debug processor are preferably independent of the processing clock pulse of the PAES, so that data processing is separated from debugging and in particular from readout of debug information.

In terms of the hardware, the clock pulse is stopped or slowed down by conventional methods, such as gated clocks and/or PLLs, and/or splitters or other methods. These means are preferably introduced at suitable locations (nodes) within the clock tree so that global clock control of the deeper branches is implementable. Slowing down the clock pulse of only selected array portions is described in the patent applications of the present applicant cited above.

It is particularly preferable for clock control information to be sent from a higher level unit, e.g., a load logic/CT, host processor) to all PAEs or to all PAEs that are to be debugged. This may be accomplished preferably via the configuration bus system. The clock control information here is typically transmitted by being broadcast, i.e., all PAEs receive the same information.

For example, the following clock control information may be implemented:

-   STOP: The working clock pulse is stopped. -   SLOW: The working clock pulse is slowed down. -   STEP: One processing step (single-step mode) is executed and then     the working clock pulse is stopped again. -   STEP (n): n processing steps are executed and the working clock     pulse is stopped again. -   GO: The working clock pulse continues normally.

The method for stopping and/or slowing down the clock pulse may also be used to reduce power consumption. If no computing power is needed at the moment, a “sleep mode” may be implemented by switching off the working clock pulse (STOP), for example, or through special instructions (SLEEP). If the full computing power is not needed, the clock pulse may be slowed down by using SLOW and/or temporarily suspended by using STEP(n). To this extent, this method may be used optionally and/or in addition to the methods described in German Patent Application No. DE 102 06 653.1 for reducing the power loss in particular.

One problem in broadcasting clock control information is the transmission time of the broadcast through the array of PAEs. At higher clock pulse frequencies, the transmission cannot take place within one working clock cycle. However, it is obligatory for all PAEs to respond to the clock control information at the same time. The clock control information is therefore preferably transmitted over a pipelined bus system similar to the CT bus system described in German Patent Application No. DE 100 28 397.7. In addition, a numerical value (LATVAL) is appended to the clock control information, this numerical value being equal to or greater than the maximum length of the pipeline of the bus system. The numerical value is decremented in cycles in each pipeline step (subtraction of 1). Each PAE receiving clock control information also decrements the numerical value with each clock pulse. This ensures that the numerical value in the pipelined bus system and the PAEs that have already received the clock control information is always exactly the same. If the numerical value reaches a value or 0, this ensures that all the PAEs have received the clock control information. The clock control information then goes into effect and the behavior of the clock pulse is modified accordingly.

Another latency time occurs due to the method described here. This latency may be additionally supported through the register pipeline which is described in greater detail below or, as is particularly preferred, by the definition of the (pre)condition by setting the (pre)condition forward to the extent that the latency time is already taken into account.

The latency time in the single-step mode is negligible because it plays a role only in the shutdown of the clock pulse (STOP). Since the STEP instruction always executes only one step, there is no corruption (delay) of the debug data due to the latency time during single-step operation.

2.2.3 Register Pipeline for Compensating for Latency

At higher operating frequencies, there may be a latency time between detecting the debug start and stopping or slowing down the clock pulse. This latency time is precisely predictable because the position of the delaying registers in the VPU is defined by the hardware and/or by the algorithm to be debugged and is therefore exactly calculable by the debugger.

However, due to the latency time, the information made available to the debug processor is shifted, so it is no longer possible to read out the correct debug information. This problem is preferably solved by a suitable definition of the (pre)condition by the programmer. By inserting a multistage register pipeline which transmits the debug information further by one register in each clock pulse, the debug processor is optionally able to use as many cycles of debug information as the register pipeline is long. The length of the register pipeline is to be designed to correspond to the maximum expected latency. Because of the precise calculability of the latency time, the debug program is now able to read the timely correct and relevant debug information out of the register pipeline.

One problem which occurs in using register pipelines is that they are relatively long and are thus expensive, based on the silicon surface area required for implementation.

2.3 Visible Debug Information

In this method, debugging is generally performed after occurrence of the (pre)condition because only thereafter is the clock pulse slowed down or stopped and the debug information read out. Debug information prior to occurrence of the (pre)condition is therefore not visible at first.

However, it is also possible, although this also involves a loss of performance, to operate a VPU at a slowed clock pulse or in single-step mode directly from the start of an application. The relevant debug information is then read out by the debug processor from the start.

3. Method B

3.1 Basic Principle

Relevant debug information from the memory units, which includes the application data and states of a certain working step in accordance with P 44 16 881.0-53, DE 196 54 846.2-53, DE 199 26 538.0, DE 101 39 170.6 as well as their additional applications and DE 101 10 530.4, is transmitted to the debug program. These memory units, hereinafter also referred to as working memories, operate more or less as registers for storing data which has been calculated within a configuration cycle in the PA or parts of the PA, in the machine model according to P 44 16 881.0-53, DE 196 54 846.2-53, DE 101 39 170.6 and their additional applications DE 199 26 538.0 and DE 101 10 530.4. Reference is made in particular to German Patent Application No. DE 101 39 170.6 and its additional applications which describe in detail the use of the memory units as registers (REG) for implementation of a processor model. The full content of DE 101 39 170.6 and its additional applications are herewith included for disclosure purposes. A memory unit here includes any arrangement and hierarchy of independent and dependent memories. It is possible to execute simultaneously a plurality of different algorithms on the PA (processing array), which then use different memories.

It is essential for the use of this method that data and/or algorithmically relevant states are stored in the memory units assigned to the PAEs, one memory unit in each case being of such size that all the relevant data and/or states of a cycle may be stored there. The length of a cycle may be determined by the size of the memory unit, which it preferably actually is (see DE 196 54 846.2-53). In other words, the cycle length is adapted to the hardware.

Different data and/or states are stored in the memory units in such a way that the latter may be assigned unambiguously to the algorithm. The debugger is therefore able to unambiguously identify the relevant data and/or states (debug information).

The relevant debug information may be determined by the programmer within the debug program—in particular also in advance. This debug information is read out of the memory units. Different methods are available for this, and a few possibilities are discussed in greater detail below. After readout of all relevant debug information, the next configuration cycle is executed and the relevant debug information is again read out. This is repeated until the programmer/debugger aborts the debugging procedure.

In other words, the relevant data and/or status information is not transmitted to the debugger in cycles but instead according to the configuration. It is read out of the memory units that are comparable to the registers of the CPU.

3.2 Support by the Hardware

For the mode of operation of the debugger, it is essential for the CT or another externally connected processor (referred to below as the debug processor (DB)) to be able to read the internal working memory (memories) of the VPU, for example. Such a possibility is provided, for example, by connecting the CT to the working memory for preloading and reading the data and/or by the method described in DE 199 26 538.0 for writing the internal memory to external memories. In one possible embodiment, the working memory may be accessed by various methods of the related art (e.g., shared memory, bank switching) by the debug processor, so that data exchange with the DB may take place largely independently of any other data processing in the VPU.

In one possible embodiment, the clock pulse of the VPU may optionally be either retarded or stopped for readout of the memory, e.g., according to method A by one or more of the measures described above and/or it may optionally be operated in a single-step mode. Depending on the implementation of the working memory, e.g., in the bank switching method, it is possible to eliminate a separate intervention involving the clock pulse. The clock pulse is typically stopped or slowed down according to method B and the working memories are read out and/or copied and/or switched only when a data processing or configuration cycle is ended.

In other words, an important advantage of method B is that it does not require any particular support by the hardware.

In one possible embodiment, a DB need only have access to the working memory. In an example embodiment which is particularly preferred, the working memory is accessed through a suitable configuration of the VPU, which therefore reads out the working memories automatically and without modification and transmits this information to a DB.

3.3 Access to Debug Information

Patents and patent applications P 44 16 881.0-53, DE 196 54 846.2-53, DE 101 39 170.69, DE 199 26 538.0 describe data processing methods in which a set of operations is mapped cyclically onto a reconfigurable data processing module. In each cycle, a plurality of data originating from a peripheral source and/or an internal/external working memory and written to a peripheral source and/or an internal/external working memory is calculated. Different working memories and/or in particular a plurality of independent working memories may be used at the same time. For example, in this data processing method, the working memories or some of the working memories function as register sets.

According to DE 101 39 170.6 and DE 199 26 538.0, all data and states relevant for further data processing are stored in the working memory and/or read out of same. In a preferred method, states irrelevant for further data processing are not stored.

The differentiation between relevant and irrelevant states is to be illustrated using the following example, although for disclosure purposes, reference is made in particular to the discussion in DE 101 39 170.6.

The state information of a comparison is essential for further processing of data, for example, because it determines the functions to be executed.

A sequential divider is formed, for example, by mapping a division instruction onto hardware that supports only sequential division. This results in a state which characterizes the computation step within division. This state is irrelevant because the algorithm needs only the result (i.e., the division performed). Therefore, in this case, only the results and the time information (i.e., the availability) are needed.

The time information is available from the RDY/ACK handshake in the VPU technology according to P 44 16 881.0-53, DE 196 51 075.9-53 and DE 199 26 538.0, for example. However, it should be pointed out here in particular that the handshake itself likewise does not constitute a relevant state because it merely signals the validity of the data, so that the remaining relevant information is in turn reduced to the existence of valid data.

DE 101 39 170.6 shows a differentiation between locally relevant states and globally relevant states:

Local: The state is relevant only within a single closed configuration. Therefore, this state need not necessarily be stored.

Global: The state information is needed for a plurality of configurations. This state must be stored.

It is possible that the programmer might want to debug a locally relevant state that is not stored in the memories. In this case, the application may be modified to create a debug configuration (equivalent to the debug code of processors), having a modification of the “normal” code of the application so that this state is additionally written into the memory unit and is therefore made available to the debugger. This results in a deviation between the debug code and the actual code which may result in a difference in the performance of the codes.

In a particularly preferred embodiment, no debugging configuration is used. Instead, the configuration to be debugged is terminated so that the data additionally required for debugging purposes outlasts the termination, i.e., it remains valid in the corresponding memory locations (REGs) (e.g., registers, counters, memories).

If the configuration to be debugged is terminated in such a way that the data additionally required for debugging purposes outlasts the termination, it is possible to perform debugging easily by not loading the next configuration required in a normal program sequence, but loading instead a configuration through which the data required for debugging purposes is transmitted to the debugging unit, i.e., the debugging means. It should be pointed out that in such debugging, the data required for debugging purposes may always be stored even later in the program run, thereby ensuring that the program which has been executed later has been subject to a debugging process in exactly the same way as required. Normal program execution may continue after readout of the debug information by a dedicated debugging configuration.

A configuration is loaded which connects the REGs in a suitable manner and in a defined order to one or more global memories to which the DB has access (e.g., working memories).

It is thus proposed that a configuration is loaded which connects the REGs in a suitable manner and in a defined order to one or more global memories to which the DB has access (e.g., working memories).

The configuration may use address generators, for example, to which the global memory (memories) has/have access. The configuration may use address generators, for example, to access REGs designed as memories. According to the configured connection between the REGs, the contents of the REGs are written in a defined order into the global memory, the particular addresses being predetermined by address generators. The address generator generates the addresses for the global memory (memories) in such a way that the described memory areas (DEBUGINFO) may be unambiguously assigned to the remote configuration to be debugged.

This method corresponds to the context switch described in DE 102 06 653.1 and DE 101 39 170.6, the full content of which is incorporated here for disclosure purposes.

The DB may then access data within a memory area (DEBUGINFO) which is accessible to it. If debugging is to be performed by a single-step method, a context switch may be performed after each single step of a configuration to be debugged, so that all data is preserved and the information to be debugged is written out of the REGs and into a working memory. While preserving the data, the configuration to be debugged is then reconfigured again and prepared for another single step. This is done for each single step to be debugged of the configuration to be debugged. Reference is made here to the possibility of debugging using the principles known as “wave reconfiguration.”

3.4 Visible Debug Information

Debugging before the (pre)condition may be performed easily and without any great loss of performance because the required debug information is available in working memories. The debug information may be secured in a simple manner by transferring the working memories to other memory areas to which the DB preferably has direct access. An even faster method is to switch the working memories by a bank switching method (according to the related art) between the individual configurations so that the debug information is always in a new bank. This switching may take place in a very time-optimizing manner, in the optimum case even without any effect on the processing performance.

It has already been disclosed that in a VPU, data may be transferred by blocks into a memory area, which may also be located outside of the actual PA and/or may have a dual-ported RAM or the like, so that it is readily possible to externally access the information thus written.

4. Mode of Operation of the Debugger

The debugger program itself may run on a DB outside of the PA. As an alternative, a VPU itself may form the DB according to the methods used with processors. To do so, a task switch or context switch (SWITCH) may be performed according to the description given in PACT11 (U.S. Published Application No. 2003-0056202). The debug information of the program to be debugged is saved together with the relevant data in a SWITCH and the debugger program, which analyzes the information and/or processes it interactively with the programmer, is loaded. Another SWITCH is then performed (in which the relevant information of the debugger is saved) and the program to be debugged is continued. It should also be mentioned that a partial area of the processor may be provided as a debugger.

The debug information is read by the debugger according to method A and/or B and is saved in a memory and/or memory area that is separate from the data processing and to which the DB preferably has direct access. The breakpoints and (pre)conditions are defined by the debugger program. The debugger program may also assume control of execution of the application, in particular the start of execution and the end of execution.

The debugger makes a suitable working environment available to the programmer, optionally with a graphical interface. In a particularly preferred embodiment, the debugger is integrated into a complex development environment with which it exchanges data and/or control information. In particular, the debugger may save the data read out of the working memories on a data medium (hard drive, CD-ROM) for any further processing and/or may run it within a network (such as Ethernet).

The debugger according to the present invention may also communicate with other tools and in particular other debuggers within a development environment described in DE 101 29 237.6-53. In a preferred embodiment, the control and/or definition of the debug parameters may be taken over from another debugger. Likewise, the debugger may make the debug information generated by it available to another debugger and/or may receive debug information from another debugger.

In particular, the determination of the occurrence of breakpoints and/or a (pre)condition may be implemented by another debugger and/or the units debugged by this other debugger. The debugger according to the present invention and the VPU then respond accordingly.

The other debugger may be in particular the debugger of another processor (CT or ARC in Chameleon, Pentium, AMD, etc.) connected to a VPU.

In particular, the other debugger may run on a processor connected or assigned to the VPU and/or it may be the processor assigned to the DB, e.g., a CT or ARC in Chameleon. In a particularly preferred embodiment, the particular processor may be a host processor such as that described in U.S. Patent Application Ser. No. 60/317,876 and/or DE 102 06 856.9, for example.

5. Evaluation of Methods

Method A is considerably more time- and resource-intensive than method B, which requires hardly any additional hardware, and also omits the time-consuming readout of debug information from the start of the application. Method B is therefore fundamentally preferable. Method B is preferred for compilers described in DE 101 39 170.6 and its related applications.

It has been recognized that in particular using methods A and B together yields the best and most transparent debugging results. In particular, depending on the depth of the error to be debugged, debugging may be performed first with the help of the fast debugging method B and then after adequate localization of the error, debugging may be performed by method A, which analyzes the details in depth.

6. Mixed-Mode Debugger

When using method B, which is particularly preferred, the problem may also occur that the visible information in the memories is insufficient.

Typically, detailed debugging may proceed as follows:

-   a) The visible debug information (PREINFO) before configuring a     breakpoint-containing configuration is saved. If an error occurs in     the breakpoint, a search is then conducted for visible debug     information (POSTINFO). Based on the PREINFO information, a software     simulator is started, simulating the configuration(s) to be     debugged. The simulator may determine each value within the PAEs and     the bus systems and output it (optionally also graphically and/or as     text), thus providing a detailed insight into the sequence of the     algorithm at the point in time when the error occurred. It is     possible in particular to compare the simulated values in each case     with the values from POSTINFO in order to rapidly recognize any     differences. -   b) The visible debug information before a breakpoint is saved. When     a breakpoint occurs, a software visualizer is started based on this     information. The module to be debugged is then operated in a     single-step method to permit readout of all relevant data according     to method A. This data may then be output either directly (including     graphically and/or as text, if necessary) and/or relayed to a     simulator whose simulation is then based on the more detailed data     and may next be output in the known ways.     6.1 Advantages of a Mixed-mode Debugger

The mixed-mode debugger permits a detailed analysis of the sequences within a module. Due to the possibility according to method B of working at full speed up to a set breakpoint and then stopping, if necessary, slowing down and/or switching to a single-step mode, if necessary, the debugging becomes time-efficient, so it becomes possible to test large volumes of data and/or complex algorithms. The preferred use of a simulator after occurrence of the breakpoint on the basis of the current data and states permits detailed insight into the hardware. If the time required for the simulation is too long and/or a 100% correspondence of the simulator to the hardware is questionable, then reading back the data in the single-step mode after occurrence of a breakpoint according to method A or according to the context switching method according to DE 102 06 653.1 and DE 101 39 170.6 permits 100% correct debugging of the algorithm and/or the hardware itself.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 b illustrates a representation of a finite automaton by a reconfigurable architecture.

FIG. 2 illustrates a finite automaton mapped on a reconfigurable architecture

FIG. 3 shows a possible schematic structure of a debugging.

FIG. 4 a shows the structure of a particularly preferred VPU.

FIG. 4 b shows the detail of an exemplary CPU system.

FIG. 5 a shows an exemplary hardware design that may be used for debugging reconfigurable processors.

FIG. 5 b shows as an example the expansion according to the present invention.

DETAILED DESCRIPTION OF EXAMPLE EMBODIMENTS

FIGS. 1 and 2 generally correspond to German Patent Application No. DE 101 39 170.6. The different approaches of methods A and B are indicated in the figures (A, B).

FIG. 1 b shows a representation of the finite automaton by a reconfigurable-architecture described in P 44 16 881.0-53 and DE 196 54 846.2-53 (DE 196 54 846.2-53, FIGS. 12 through 15). The combinatory network of FIG. 1 a (0101) is replaced by a system of PAEs 0107 (0101 b). Register (0102) is embodied by a memory (0102 b) capable of storing a plurality of cycles. Feedback according to 0105 takes place through 0105 b. Inputs (0103 b and 0104 b) are equivalent to 0103 and 0104, respectively. Direct access to 0102 b may be implemented through a bus via array 0101 b, if necessary. Output 0106 b is in turn equivalent to 0106.

FIG. 2 shows an illustration of a finite automaton mapped on a reconfigurable architecture, 0201(x) representing the combinatory network (which may be embodied as a PAE according to FIG. 1 b). There are one or more memories for operands (0202) and one or more memories for results (0203). Additional data inputs/outputs (0103 b, 0104 b, 0106 b) are not shown for the sake of simplicity. An address generator (0204, 0205) is assigned to each memory.

Operand and result memories (0202, 0203) are linked together physically or virtually so that the results of a function may be used as the operands of another memory and/or results and operands of a function may also be used as the operands of another memory. Such a linkage may be established through bus systems, for example, or via (re)configuration whereby the function and interconnection of the memories with 0201 are reconfigured.

FIG. 3 shows a possible schematic structure of the debugging according to method B. Reference should be made in particular to FIGS. 19, 20 and 21 of German Patent Application No. DE 199 26 538.0 in which the basis of the memories is described. The full content of DE 199 26 538.0 is herewith incorporated for disclosure purposes.

0101 b and 0102 b are shown as already described. In addition, an external memory unit (0302) is also shown which may be connected (0307) to 0102 b, as in DE 199 26 538.0. Both 0102 b and 0302 may be external or internal memory units. Likewise, one memory unit should be defined as at least one register, a set of registers or a memory (RAM, flash, etc.) or a bulk memory (hard drive, tape, etc.).

Debugging unit 0301 may set breakpoints within 0101 b (0303) on the basis of which the actual debugging operation is triggered. On reaching a breakpoint, information (0304) is sent to 0301, starting the debugging operation. At the same time, all procedures for debugging (e.g., stopping and/or slowing down the cycle) within 0101 b are triggered. As an alternative, information may also be generated through 0301 and sent to 0101 b. Via 0305 and/or 0306, it is possible for 0301 to access the data or states from memory 0102 b and/or memory 0302. The access may take place, for example,

-   1. via memory linkage (block move, i.e., copying the memory into     another area controlled by 0301), -   2. via a line (serial or parallel line over which one or more memory     areas are transmitted, e.g, JTAG), -   3. via bus linkages, regardless of the type (the memories are     arbitrated as in a DMA method and are processed by 0301).

A figure from DE 199 26 538.0 has been selected as an example. It should be pointed out explicitly that generally any memory and any memory linkage (stack, random access, FIFO, etc.) may be processed accordingly.

FIGS. 4 a and 4 b show other possible embodiments; these have been described in German Patent Application No. DE 102 06 856.9, the full content of which is herewith included for disclosure purposes.

FIG. 4 a shows the structure of a particularly preferred VPU. Preferably hierarchical configuration managers (CTs) (0401) control and manage a system of reconfigurable elements (PACs) (0402). The CTs are assigned a local memory for configurations (0403). The memory also has an interface (0404) to a global memory which provides the configuration data. The configuration sequences are controllable via an interface (0405). An interface of reconfigurable elements (0402) for sequence control and event management (0406) is provided; likewise there is an interface for data exchange (0407). For example, one CT may function as a DB.

FIG. 4 b shows a detail of an exemplary CPU system, e.g., a DSP of the C6000 type from Texas Instruments (0451). This shows program memory (0452), data memory (0453), any peripheral (0454) and EMIF (0455). A VPU is integrated as coprocessor (0458) via a memory bus (0456) and a peripheral bus (0457). A DMA controller (EDMA) (0459) may perform any DMA transfers, e.g., between memory (0453) and VPU (0458) or memory (0453) and periphery (0454). In this example, 0451 may function as a DB and in particular the debugger according to the present invention may also be connected to and/or integrated into its debugger.

FIG. 5 a shows an exemplary hardware design that may be used for debugging reconfigurable processors. A pipelined configuration bus 0501 like that described in DE 100 28 397.7 is used for this purpose. The pipeline is composed of a plurality of register stages (0502) in the horizontal and/or vertical direction to achieve higher clock pulse frequencies. The pipelined configuration bus is connected to configuring elements (PAEs) (0503) to supply them with configuration data.

FIG. 5 b shows as an example the expansion according to the present invention. Each register stage (0502) decrements the numerical value (LATVAL) by one (indicated by −1) to compensate for the latency time. Likewise, each PAE (0503), which has already received clock control information, decrements it by one per cycle (indicated by −1/T). It is then possible to have not only write access but also read access to the PAEs and in particular to their internal registers, e.g., via a special control line (RD) to read out debug data. In this example, data to be read and written passes through the bus system through the arrays of PAEs from left to right and in the reverse direction in the bottom row. The configuration bus is also connected back (0504) like a pipeline via register stages (0505). In this example, a higher-level unit (CR/load logic, host processor) (0506) may also have read and write access to the bus like a dedicated test interface (0507). The test interface may have its own test controller and in particular may be compatible with one or more test interfaces available on the market (e.g., JTAG, Tektronix, Rhode & Schwarz, etc.). The choice of the bus controlling unit is made via a multiplexer/demultiplexer unit (0508). A circuit for back-calculating the source address (0509) of debug data arriving via 0504 may be provided in 0509 (shown in parentheses and in italics) or upstream from units 0506 and 0507. The address calculations within the system shown here are performed as follows: first, the address is applied to bus 0501 through 0506 or 0507. Like the processing of numerical values (LATVAL) for the latency computation, the address is decremented in each register stage (0502 and 0505). As soon as the address is equal to 0, the PAE after the register stage is selected. In the following register stage the address becomes negative so that no other PAEs are activated. If data is read out of a PAE, it is transmitted again together with the address. The address is decremented further in each register stage. A reverse calculation in 0509 of the addresses arriving at 0506 and/or 0507 together with the debugging data is now possible via a simple addition, by adding the number of decrementing register stages to the incoming address value. It should be pointed out that register stages 0502 in FIG. 5 b are designed to be easily distinguishable from register stages 0502 in FIG. 5 a. Namely, in FIG. 5 b, they additionally have a circuit (e.g., multiplexer) for selecting the data to be relayed, either forwarding the data of bus 0501 or forwarding the output of the particular PAE (0503) and thus the debugging data. The arrival of the address value equal to 0 may be used to trigger the circuit.

It is pointed out here again that dedicated test interface (0507) conforms to industry standards. It may be used for tests during the software debugging procedure and/or for testing during the assembly of hardware components and systems (e.g., assembling circuits on a circuit board) and/or for function tests of the semiconductor module (chip) as part of semiconductor fabrication. In particular, the usual scan chain may be omitted here for testing the register during the function test of the semiconductor or it may at least be minimized because then only the registers that are not triggerable by the bus system (0501) need pass through the scan chain.

Likewise, it is pointed out in particular that the method explained in conjunction with FIG. 5 is by no means limited to use with configuration buses. Ordinary data bus systems may also be used at the different test times and debugging times and types of test and debugging listed previously. In particular, reference should be made in this connection to the data bus system in DE 197 04 742.4. DE 197 04 742.4 is herewith incorporated fully for disclosure purposes. The methods described in conjunction with FIG. 5, easily understandable for an engineer having ordinary technical expertise, may also be applied to DE 197 04 742.4.

Mixed operation of different bus systems such as configuration bus systems, data bus systems according to DE 197 04 742.4 and ordinary data bus systems is also fundamentally possible. Therefore a plurality of test interfaces may be provided or (and this option is technically preferable) multiplexer/demultiplexer stage (0508) may be designed for a plurality of bus systems (n×0501, n×0504).

In conclusion, it should also be mentioned in particular that by connecting back the bus system according to FIG. 5 b, the configuration data which is also to be written into the PAEs is also returned. Use of the configuration buffer memory FIFOs according to DE 100 28 397.7 (FIGS. 8 and 9 (0805, 0903)) may be omitted with the help of the address back-calculation (0509) and returned status line REJ, which indicates rejection of the configuration according to DE 100 28 397.7, DE 198 07 872.2, DE 196 54 593.5-53 because their functionality is now mapped completely via the bus system described here.

8. Definition of Terms

-   Locally relevant state State that is relevant only within a certain     configuration. -   Globally relevant state State that is relevant in a plurality of     configurations and must be exchanged among the configurations. -   Relevant state State that is needed within an algorithm for correct     execution thereof and is thus described and used by the algorithm. -   Irrelevant state State that is of no significance for the actual     algorithm and is also not described in the algorithm but is needed     by the hardware performing the execution as a function of the     implementation. 

1. A method for debugging a program running on reconfigurable hardware, comprising: writing debug information into a memory in each of a plurality of configuration cycles; analyzing, by a debugger, the debug information; loading a configuration, wherein the loading is performed during the debugging and responsive to occurrence of a debugging condition that indicates that information, regarding one of the configuration cycles, is needed; and using the loaded configuration, reading the debug information out of the memory.
 2. The method as recited in claim 1, further comprising: altering a configuration to be debugged before the debugging in such a way that information not needed in normal non-debugging execution is stored in a memory.
 3. The method as recited in claim 1, further comprising: writing the debug information into a debugging unit or a debugging configuration.
 4. A method for debugging a program running on reconfigurable hardware, comprising: in each of a plurality of configuration cycles, configuring at least a portion of the reconfigurable hardware according to configurations defined by the program; writing debug information into a memory in each of the plurality of configuration cycles; analyzing, by a debugger, at least some of the debug information; and at least partially slowing down or stopping a clock pulse frequency for readout.
 5. The method as recited in claim 4, wherein the at least partially slowing down and stopping the clock pulse is performed responsive to completion of each of a plurality of processing steps of a configuration cycle.
 6. A method for debugging a program running on reconfigurable hardware, comprising: in each of a plurality of configuration cycles, configuring at least a portion of the reconfigurable hardware according to configurations defined by the program; writing debug information into a memory in each of the plurality of configuration cycles; analyzing, by a debugger, at least some of the debug information; and simulating one of the plurality of configuration cycles according to readout of relevant information or according to previously available information.
 7. The method as recited in claim 6, wherein the simulating includes outputting simulated values of each of at least one configurable element of the reconfigurable hardware determined for the simulated configuration cycle.
 8. A reconfigurable device, comprising: a field of configurable elements, the field including at least one of coarse-grained logic and arithmetic units; a debugging arrangement for debugging a program running on the reconfigurable device, the debugging arrangement including a memory, wherein the debugging arrangement is adapted to: write debug information into the memory in each of a plurality of configuration cycles in which one or more of the configurable elements is configured; load a configuration, wherein the loading is performed during a debugging procedure and responsive to occurrence of a debugging condition that indicates that information, regarding one of the configuration cycles, is needed; and using the loaded configuration, reading the debug information out of the memory; and an analysis device adapted to analyze the debug information.
 9. The device as recited claim 8, wherein the memory is a dual-ported RAM having a first input for information to be saved from the field and a second input for readout of information into the analysis device.
 10. A method for debugging a program running on hardware including modules that are reconfigurable in a configuration cycle with respect to at least one of function and interconnection, comprising: in each of at least a subset of a plurality of configuration cycles performed during the running of the program and for which debug information is to be obtained, at least a subset of the reconfigurable hardware modules being reconfigured in each of the configuration cycles with respect to the at least one of function and interconnection: writing debug information into a memory; and reading out of the memory the debug information for use by a debugger; and analyzing by the debugger the debug information.
 11. The method of claim 10, further comprising: altering a configuration to be debugged before the debugging in such a way that information not needed in normal non-debugging execution is stored in a memory.
 12. The method of claim 11, further comprising: writing the debug information into a debugging unit or a debugging configuration.
 13. The method of claim 11, further comprising: at least partially slowing down or stopping a clock pulse frequency for readout.
 14. The method of claim 10, further comprising: at least partially slowing down or stopping a clock pulse frequency for readout.
 15. The method of claim 14, further comprising: writing the debug information into a debugging unit or a debugging configuration.
 16. The method of claim 15, further comprising: performing a cycle process of a configuration to be debugged, step by step.
 17. The method of claim 10, further comprising: performing a cycle process of a configuration to be debugged, step by step.
 18. The method of claim 17, further comprising: at least partially slowing down or stopping a clock pulse frequency for readout.
 19. The method as recited in any of claims 10-18, further comprising: simulating a configuration to be debugged according to readout of relevant information or according to previously available information.
 20. A dynamically reconfigurable device, comprising: a field of dynamically configurable elements, the field including at least one of coarse-grained logic and arithmetic units; and a debugging arrangement to debug a program while executed on the field of configurable elements, wherein the debugging arrangement includes a memory to store information relevant to debugging during or at an end of a working step of the field of dynamically configurable elements; wherein, in each of at least a subset of a plurality of configuration cycles (a) performed during execution of the program on the field of configurable elements, (b) during which at least a portion of the field of configurable elements are reconfigured with respect to at least one of function and interconnection, and (c) for which the information relevant to debugging is to be obtained, the debugging arrangement is configured to: write the information relevant to debugging to the memory; and read the information relevant to debugging out of the memory for debugging.
 21. The device as recited in claim 20, wherein the memory is a dual-ported RAM having a first input for information to be saved from the field and a second input for readout of information into an analysis device.
 22. A method for debugging a program running on hardware including modules that are reconfigurable in a configuration cycle with respect to at least one of function and interconnection, a plurality of configuration cycles being performed for the running of the program, at least a subset of the reconfigurable hardware modules being reconfigured in each of the plurality of configuration cycles with respect to the at least one of function and interconnection, the method comprising: for at least a subset of the plurality of configuration cycles which occurs during a debugging operation: following a first of the subset of the plurality of configuration cycles, prior to each subsequent one of the subset of the plurality of configuration cycles, transferring debug information from the reconfigurable modules into a memory; reading out of the memory the debug information for use by a debugger; and analyzing by the debugger the debug information. 